﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace KopeykaStore.Models
{
    public class Product
    {
        [ScaffoldColumn(false)]
        public int ProductId { get; set; }

        [DisplayName("Category")]
        public int CategoryId { get; set; }

        [DisplayName("Brand")]
        public int BrandId { get; set; }

        [Required(ErrorMessage = "An Product Title is required")]
        [StringLength(160)]
        public string Title { get; set; }

        public string Description { get; set; }

        [Required(ErrorMessage = "Price is required")]
        public decimal Price { get; set; }

        [DisplayName("Thumbnail URL")]
        [StringLength(1024)]
        public string ThumbnailUrl { get; set; }

        [DisplayName("Image URL")]
        [StringLength(1024)]
        public string ImageUrl { get; set; }


        [DisplayName("Zoom URL")]
        [StringLength(1024)]
        public string ZoomUrl { get; set; }

        public virtual Category Category { get; set; }
        public virtual Brand Brand { get; set; }
        public virtual List<OrderDetail> OrderDetails { get; set; }

    }
}